(function () {
    if (window !== window.top)
        return;

    var testRunId           = {{{testRunId}}};
    var browserId           = {{{browserId}}};
    var selectorTimeout     = {{{selectorTimeout}}};
    var speed               = {{{speed}}};
    var browserHeartbeatUrl = {{{browserHeartbeatUrl}}};
    var browserStatusUrl    = {{{browserStatusUrl}}};
    var skipJsErrors        = {{{skipJsErrors}}};
    var dialogHandler       = {{{dialogHandler}}};
    var userAgent           = {{{userAgent}}};
    var fixtureName         = {{{fixtureName}}};
    var testName            = {{{testName}}};

    var ClientDriver = window['%testCafeDriver%'];
    var driver       = new ClientDriver(
        { testRun: testRunId, browser: browserId },
        { heartbeat: browserHeartbeatUrl, status: browserStatusUrl },
        { userAgent: userAgent, fixtureName: fixtureName, testName: testName },
        { selectorTimeout: selectorTimeout, skipJsErrors: skipJsErrors, dialogHandler: dialogHandler, speed: speed }
    );

    driver.start();
})();
